package homework4;

import java.util.Scanner;

//在同一个类中定义多个方法：要求不仅可以求2个整数的最大值，还可以求3个小数的最大值？
public class T6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            double c = sc.nextDouble();
            System.out.println(a + "和" + b + "的较大值为" + getMax(a, b));
            System.out.println(a + "与" + b + "与" + c + "的较大值为" + getMax(a, b, c));

        }
        sc.close();
    }

    public static int getMax(int a, int b) {
        return a > b ? a : b;
    }

    public static double getMax(double a, double b, double c) {
        return getMax(getMax(a, b), c);
    }

    public static double getMax(double a, double b) {
        return a > b ? a : b;
    }

}
